elastic-del:
    cmd.run: #执行本地命令
        - name: rpm -e elasticsearch &&  rm -rf /home/elasticsearch/ /usr/share/elasticsearch/ /etc/elasticsearch/
        - onlyif: rpm -q elasticsearch
